package com.hgkj.cloud.base.service;

import com.hgkj.cloud.base.domain.AppChannel;
import com.hgkj.cloud.base.dao.AppChannelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class AppChannelService {

    @Autowired
    private AppChannelMapper appChannelMapper;


    public AppChannel selectByPrimaryKey(Integer id) {
        return appChannelMapper.selectByPrimaryKey(id);
    }

    public int deleteByPrimaryKey(Integer id) {
        return appChannelMapper.deleteByPrimaryKey(id);
    }

    public int insert(AppChannel record) {
        return appChannelMapper.insert(record);
    }

    public int insertSelective(AppChannel record) {
        return appChannelMapper.insertSelective(record);
    }

    public int updateByPrimaryKeySelective(AppChannel record) {
        return appChannelMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(AppChannel record) {
        return appChannelMapper.updateByPrimaryKey(record);
    }

    public AppChannel selectDataByCoupon(String coupon) {
        return appChannelMapper.selectDataByCoupon(coupon);
    }
    public AppChannel selectDataByCode(String code) {
        return appChannelMapper.selectDataByCode(code);
    }

    public AppChannel getFirstChannel() {
        return appChannelMapper.getFirstChannel();
    }

    public AppChannel selectDataByMap(Map<String, Object> map) {
        return appChannelMapper.selectDataByMap(map);
    }
    public AppChannel getChannelByCodeOrFid(Map<String, Object> map) {
        return appChannelMapper.getChannelByCodeOrFid(map);
    }


    public List<AppChannel> listAllData(Map<String, Object> map) {
        return appChannelMapper.listAllData(map);
    }

    public Long listAllDataCount(Map<String, Object> map) {
        return appChannelMapper.listAllDataCount(map);
    }

    public long getChannelCount(HashMap<Object, Object> map) {
        return appChannelMapper.getChannelCount(map);
    }


    public AppChannel selectDataByDevCode(String devCode) {
        return appChannelMapper.selectDataByDevCode(devCode);
    }

    public int updateDataBychannelId(Map<String, Object> map) {
        return appChannelMapper.updateDataBychannelId(map);
    }
}
